<?php
// Check to ensure this file is included in Joomla!
defined('_JEXEC') or die();

jimport( 'joomla.application.component.view');

class LettermanViewCampaign extends JView
{
	function display()
	{
		global $mainframe, $option;

		// Add the stylesheet for the iframe
		$document = & JFactory::getDocument();
		$document->addStyleSheet( 'components/com_letterman/views/campaign/campaign.css', 'text/css', null, array( 'id' => 'StyleSheet' ) );
		
		// If we have an ID then we are editing and need the campaign data.
		if (JRequest::getVar('cid'))
		{
			$model	=& $this->getModel();
			$campaign =& $this->get('data');
			$this->assignRef('campaign', $campaign);
		}
		
		// Create select lists here to keep tmpl uncluttered
		$this->assignRef('published', JHTML::_('select.booleanlist',  'published', 'class="inputbox"', $campaign->published ));
		$this->assignRef('access', JHTML::_('list.accesslevel',  $campaign ));

		parent::display();

	}
	
	function deleteForm()
	{
		global $mainframe, $option;

		// Add the stylesheet for the iframe
		$document = & JFactory::getDocument();
		$document->addStyleSheet( 'components/com_letterman/views/campaign/campaign.css', 'text/css', null, array( 'id' => 'StyleSheet' ) );
		
		$this->assignRef('cid[]', JRequest::getVar('cid[]'));
		parent::display();		
	}
}
?>
